﻿@model MusicOnLine.Models.AACInfo

@{
    ViewBag.Title = "上传歌曲";
    Layout = "~/Views/Shared/_Layoutback.cshtml";
}
<style type="text/css">
     input{ vertical-align:middle; margin:0; padding:0}
    .file-box{ position:relative;width:340px; margin-top:5px;}
    .txt{ height:18px; border:1px solid #ABADB3; width:180px;}
    .btn{ background-color:#FFF; border:1px solid #ABADB3;height:20px; width:70px;}
    .file{ position:absolute; top:0; right:80px; height:24px; filter:alpha(opacity:0);opacity: 0;width:260px }
</style>


@using (Html.BeginForm("Create", "ManageSong", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>上传歌曲</legend>

        <div class="editor-label">
            选择文件
        </div>
      
       <div class="editor-field">               
          <div class="file-box">
              @Html.TextBoxFor(model=>model.Location)           
             <input type='button' class='btn' value='浏览...' />
             <input type="file" name="fileLocation" class="file" id="fileLocation" size="28" onchange="document.getElementById('Location').value=this.value" />
                @Html.ValidationMessageFor(model => model.Location)
            </div>
        </div>
        
         <div class="editor-label">
            曲名
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            专辑名
        </div>
        <div class="editor-field">
            @Html.EditorFor(model=>model.Album)
            @Html.ValidationMessageFor(model => model.Album)
        </div>       

        <div class="editor-label">
            专辑艺术家
        </div>
        <div class="editor-field">
            @Html.EditorFor(model=>model.AlbumArtist)
            @Html.ValidationMessageFor(model => model.AlbumArtist)
        </div>        
        <div class="editor-label">
            @Html.LabelFor(model=>model.IMGPath)
        </div>
         <div class="editor-field">               
          <div class="file-box">
              @Html.TextBoxFor(model=>model.IMGPath)           
             <input type='button' class='btn' value='浏览...' />
             <input type="file" name="fileImgUrl" class="file" id="fileImgUrl" size="28" onchange="document.getElementById('IMGPath').value=this.value" />
                @Html.ValidationMessageFor(model => model.IMGPath)
            </div>
        </div>      
        <div class="editor-label">
           歌曲艺术家
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Artist)
            @Html.ValidationMessageFor(model => model.Artist)
        </div>
        <div class="editor-label">
            风格
        </div>
        <div class="editor-field">            
            @Html.DropDownList("Genre",ViewBag.GenreList as SelectList)
            @Html.ValidationMessageFor(model => model.Genre)
        </div>

        <div class="editor-label">
            发布日期
        </div>
        <div class="editor-field">
            @Html.DatePickerFor(model=>model.ReleaseDate)
            @Html.ValidationMessageFor(model => model.ReleaseDate)
        </div>

        <div class="editor-label">
           年份
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Year)
            @Html.ValidationMessageFor(model => model.Year)
        </div>
        <p>
            <input type="submit" value="上传" />
        </p>
        <div>
    @Html.ActionLink("Back to List", "Index")
        </div>
    </fieldset>
}


<script type="text/javascript">
    $(document).ready(function () {
        $("#divMangeAAC").addClass("currentMenu");        
    })
</script>